If DM_USB_GADGET is used, the usb ethernet gadget driver must be bound to a
controller before the image can be downloaded over the network.
In u-boot this can be done with the bind command. In SPL it must be done
programmatically.
Signed-off-by: Jean-Jacques Hiblot <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
struct spl_boot_device *bootdev)
{
bootdev->boot_device_name = "usb_ether";
-
+#if CONFIG_IS_ENABLED(DM_USB_GADGET)
+ usb_ether_init();
+#endif
return spl_net_load_image(spl_image, bootdev);
}
SPL_LOAD_IMAGE_METHOD("USB eth", 0, BOOT_DEVICE_USBETH, spl_net_load_image_usb);